package cn.iune.erp.accounting;

import java.text.ParseException;
import java.util.List;
import java.util.Map;

import com.alibaba.fastjson.JSONObject;

import cn.iune.common.base.IBizDataIface;

public interface IAccountCaptionService extends IBizDataIface {

	List<AccountCaption> getAll();

	AccountCaption getByID(String fID);

	void delete(String fID);
	
	public AccountCaption getByNo(String captionNo, String enterpriseNo);


	///////////////////////业务功能///////////////////////////////////////
	List<String> getRootIDs(String enterpriseNo);

	List<String> getChildIDs(String fParent);


	//更新修改人
	int updateAlterUser(AccountCaption fs, String cUsercode, String cUserName);

	//更新层级
	int updateNodeLevel(AccountCaption fs, int nodeLevel);

	//更新层级
	int updateILevel(String rowID, int nodeLevelParent);

	//更新叶子状态
	int updateNodeKind(AccountCaption fs, String nodeKind);

	//更新父级
	int updateParentID(AccountCaption fs, String fParent);

	//更新sortNo
	int updateSortNo(AccountCaption fs, String sortNo);

	//更新全路径ID
	int updateFullID(AccountCaption fs, String captionFullID);

	//更新全路径ID
	int updateFullNo(AccountCaption fs, String captionFullNo);

	//更新全路径名称
	int updateFullName(AccountCaption fs, String captionFullName);

	//更新全路径ID和名称
	int updateFullNoName(AccountCaption fs, String captionFullNo, String captionFullName);

	//获取子节点数量
	int getChildCount(String fParent);

	//新增行的排序号编写
	String getSortNoByParent(String fParent);

	//获取ids
	List<String> getIDsByParent(String fParent, String enterpriseNo);

	//更新全路径信息
	int rewriteFullInfoByFullID(String fID, String captionFullID, String nodeKind);

	//移动
	int move(String rowID, String oldParentID, String newParentID);

	//排序
	int sort(String parentID, List<String> ids/*,List<Integer> versions*/);

	//获取数据库的父
	AccountCaption getParent(AccountCaption fs);

	//获取数据库的根
	AccountCaption getRoot(AccountCaption fs);

	Map<String, Object> toMap(AccountCaption ac);

	List<AccountCaption> getChildren(String fParent);

	JSONObject save(JSONObject object) throws ParseException;

	List<AccountCaption> getList(String enterpriseNo);


}
